const {series, parallel} = require('gulp')

const task1 = done => {
    setTimeout(() => {
      console.log('task1 working~')
      done()
    }, 1000)
}
  
const task2 = done => {
    setTimeout(() => {
      console.log('task2 working~')
      done()
    }, 1000)  
}
  
const task3 = done => {
    setTimeout(() => {
      console.log('task3 working~')
      done()
    }, 1000)  
}

// 串行任务，让多个任务按照顺序依次执行
exports.foo = series(task1, task2, task3)

// 并行任务， 让多个任务同时执行
exports.bar = parallel(task1, task2, task3)